home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / procssng / ccs / ccs-11tl.lha / lbl / sun / jpeg / lib / makefile.src < prev    next >
Encoding:
Makefile  |  1993-08-23  |  3.3 KB  |  97 lines

  1. #
  2. # makefile for user-contributed/lbl/jpeg/lib
  3. #
  4.  
  5. # This makefile is suitable for Unix-like systems with non-ANSI compilers.
  6. # If you have an ANSI compiler, makefile.ansi is a better starting point.
  7.  
  8. LIBNAME = libjpeg.a
  9. LOCAL_INC = -I$(CCS_ROOT)/include $(CPPFLAGS)
  10. CFLAGS2 = $(LOCAL_INC) -DHAVE_UNSIGNED_CHAR -DHAVE_UNSIGNED_SHORT
  11. # -DMEM_STATS
  12. # This file is derived from makefile.unix for UNIX system
  13. # check SETUP file for different system
  14.  
  15. # virtual source files (not present in distribution file, see SETUP)
  16. VIRTSOURCES= jmemsys.c
  17. # system-dependent implementations of virtual source files
  18. SYSDEPFILES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemdos.h \
  19.         jmemdosa.asm
  20. # files included by source files
  21. INCLUDES= jinclude.h jconfig.h jpegdata.h jversion.h jmemsys.h
  22. # documentation, test, and support files
  23. DOCS= README SETUP USAGE CHANGELOG cjpeg.1 djpeg.1 architecture codingrules
  24. MAKEFILES= makefile.ansi makefile.unix makefile.manx makefile.sas \
  25.         makcjpeg.atari makdjpeg.atari makljpeg.atari makefile.mc5 \
  26.         makefile.mc6 makefile.bcc makefile.mms makefile.vms makvms.opt
  27. OTHERFILES= ansi2knr.c ckconfig.c example.c
  28. TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg
  29. DISTFILES= $(DOCS) $(MAKEFILES) $(SOURCES) $(SYSDEPFILES) $(INCLUDES) \
  30.         $(OTHERFILES) $(TESTFILES)
  31. # objectfiles common to cjpeg and djpeg
  32. COMOBJECTS= jutils.o jerror.o jmemmgr.o jmemsys.o strmjpeg.o hread_jheader.o
  33. # compression objectfiles
  34. NOTUSED_COBJS = jrdgif.o jrdppm.o jrdrle.o
  35. CLIBOBJECTS= jcmaster.o jcdeflts.o jcarith.o jccolor.o jcexpand.o jchuff.o \
  36.         jcmcu.o jcpipe.o jcsample.o jfwddct.o jwrjfif.o jrdtarga.o
  37. COBJECTS= cjpeg.o
  38. # decompression objectfiles
  39. DLIBOBJECTS= jdmaster.o jddeflts.o jbsmooth.o jdarith.o jdcolor.o jdhuff.o \
  40.         jdmcu.o jdpipe.o jdsample.o jquant1.o jquant2.o jrevdct.o jrdjfif.o \
  41.         jpeg_r.o jwrgif.o jwrppm.o jwrrle.o jwrtarga.o
  42. DOBJECTS= djpeg.o
  43. # These objectfiles are included in libjpeg.a
  44. LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
  45.  
  46. ANSI2KNR = ../ansi2knr
  47. PRGMS = cjpeg.out djpeg.out
  48.  
  49. default: $(ANSI2KNR) $(LIBNAME)
  50. install: $(ANSI2KNR) $(LIBNAME)
  51.  
  52. # This rule causes ansi2knr to be invoked.  If you use this makefile,
  53. # make sure PROTO is not defined by jconfig.h.
  54.  
  55. .c.o:
  56.     $(ANSI2KNR) $*.c tmpansi.c
  57.     $(COMPILEc) -c $(CFLAGS2) tmpansi.c -o $*.o
  58.     $(RM) tmpansi.c
  59.  
  60. $(ANSI2KNR): ansi2knr.c
  61.     $(CC) $(CFLAGS) -o $(ANSI2KNR) ansi2knr.c
  62.  
  63. $(PRGMS):    $(COBJECTS) $(DOBJECTS)
  64.     $(LINKc) $* $*.o $(LIBRARIE6) $(CPPFLAGS2) -lpixrect
  65.  
  66. # libjpeg.a is useful if you are including the JPEG software in a larger
  67. # program; you'd include it in your link, rather than the individual modules.
  68. $(LIBNAME): $(ANSI2KNR) $(LIBOBJECTS)
  69.     @rm -f $(LIBNAME) tmpansi.c
  70.     ar cr $(LIBNAME) `$(LORDER) $(LIBOBJECTS) | $(TSORT)`;
  71.     mv $(LIBNAME) $(LIBDIR)
  72.     $(RANLIB) $(LIBDIR)/$(LIBNAME)
  73.     @touch $(LIBNAME)
  74.  
  75. jmemsys.c:
  76.     echo You must select a system-dependent jmemsys.c file.
  77.     echo Please read the SETUP directions.
  78.     exit 1
  79.  
  80. clean:
  81.     rm -f *.o $(LIBNAME) ansi2knr core tmpansi.* testout.*
  82. clean-all:    clean_all
  83.  
  84. distribute:
  85.     $(RM) jpegsrc.tar*
  86.     tar cvf jpegsrc.tar $(DISTFILES)
  87.     compress -v jpegsrc.tar
  88.  
  89. test: cjpeg djpeg
  90.     $(RM) testout.ppm testout.gif testout.jpg
  91.     ./djpeg testorig.jpg >testout.ppm
  92.     ./djpeg -gif testorig.jpg >testout.gif
  93.     ./cjpeg testimg.ppm >testout.jpg
  94.     cmp testimg.ppm testout.ppm
  95.     cmp testimg.gif testout.gif
  96.     cmp testimg.jpg testout.jpg
  97.